package edu.mit.compilers.assembly.x64.codes;

import edu.mit.compilers.assembly.x64.basic.X64Operand;

public class X64LeaCode extends X64Code {
    private X64Operand src;
    private X64Operand dest;

    public X64LeaCode(X64Operand src, X64Operand dest) {
        assert !(src.isMemoryOperand() && dest.isMemoryOperand());
        this.src = src;
        this.dest = dest;
    }

    @Override
    protected String getStringFroShow(String prefix, boolean debug) {
        return prefix + "leaq" + TAB + src.getAddress() + "," + TAB + dest.getAddress() + '\n';
    }
}
